﻿using CtPlc.Pandi.ColumbusSystemMaintenance.Models;
using FluentNHibernate.Mapping;

namespace CtPlc.Pandi.ColumbusSystemMaintenance.Mapping
{
    public class CrmContactMap : ClassMap<CrmContact>
    {
        public CrmContactMap()
        {
            Table("CrmContact");
            Id(x => x.Id).Column("ContactId").GeneratedBy.Assigned();
            Map(x => x.CreatedBy).Column("CreatedBy");
            Map(x => x.CreatedOn).Column("CreatedOn");
            Map(x => x.UpdatedBy);
            Map(x => x.UpdatedOn);
            Map(x => x.DeactiveYN).Column("DeactiveYN");
            Map(x => x.RuleBookContact).Column("RuleBookContact");
            Map(x => x.ContactApplicableId).Length(1);
            Map(x => x.PublicationRestricted);
            Map(x => x.EventRestricted);
        }
    }
}